package com.jwater.core.manager.proxy.cmd;

import com.jwater.core.serialize.ProtoStuffSerialize;

/**
 * @description:命令结果
 * @author: jnner
 * @createDate: 2021/2/5
 * @version: 1.0
 */
public class CmdResult {
    private static ProtoStuffSerialize serialize = new ProtoStuffSerialize();
    private boolean success;
    private String msg;
    private Object data;

    public byte[] serialize() {
        return serialize.serialize(this);
    }

    public CmdResult deserialize(byte[] data) {
        return serialize.deserialize(data, CmdResult.class);
    }

    public boolean getSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
